package com.ztao.controller;

import com.heima.model.common.admin.dto.SensitiveDto;
import com.heima.model.common.admin.pojos.WmSensitive;
import com.heima.model.common.dtos.ResponseResult;
import com.ztao.service.SensitiveService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/sensitive")
public class SensitiveController {
    @Resource
    private SensitiveService sensitiveService;
    @PostMapping("/list")
    public ResponseResult findAll_Sensitive(@RequestBody SensitiveDto dto)
    {
        return sensitiveService.findAll_Sensitive(dto);
    }
    @DeleteMapping("del/{id}")
    public ResponseResult del_Sensitive(@PathVariable("id") Integer id) {
        return sensitiveService.delete_Sensitive(id);
    }

    @PostMapping("/save")
    public ResponseResult add_Sensitive(@RequestBody WmSensitive wmSensitive)
    {
        return sensitiveService.add_Sensitive(wmSensitive);
    }

    @PostMapping("/update")
    public ResponseResult update_Sensitive(@RequestBody WmSensitive wmSensitive)
    {
        return sensitiveService.update_Sensitive(wmSensitive);
    }
}
